﻿
@model OnlineEducation.Areas.Student.Models.UserEditModel
@{
    Layout = null;
}

<div class="modal-header">
    <h4 class="modal-title">修改学生账号</h4>
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>

<form onsubmit="return SubmitForm(this,'/Student/Edit/')">
    <div class="modal-body p-4">
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <input type="hidden" asp-for="Id" />

        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label asp-for="UserName" class="control-label"></label>
                    <input asp-for="UserName" class="form-control" placeholder="输入手机号或者邮箱" onkeyup="this.value=this.value.replace(/^\s+|\s+$/g,'')" />
                    <span asp-validation-for="UserName" class="text-danger"></span>
                </div>
            </div>
       
            <div class="col-md-6">
                <div class="form-group">
                    <label asp-for="FullName" class="control-label"></label>
                    <input asp-for="FullName" class="form-control" placeholder="输入姓名" onkeyup="this.value=this.value.replace(/^\s+|\s+$/g,'')" />
                    <span asp-validation-for="FullName" class="text-danger"></span>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label asp-for="Gender" class="control-label"></label>
                    <select asp-for="Gender" class="form-control" placeholder="输入性别" asp-items="Html.GetEnumSelectList<OnlineEducation.Enums.Gender>()"></select>

                </div>
            </div>
       
            <div class="col-md-6">
                <div class="form-group">
                    <label asp-for="BirthDate" class="control-label"></label>
                    <input asp-for="BirthDate" type="date" class="form-control" placeholder="输入生日" />

                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label asp-for="Address" class="control-label"></label>
                    <input asp-for="Address" class="form-control" placeholder="输入地址" />

                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label asp-for="Email" class="control-label"></label>
                    <input asp-for="Email" class="form-control" placeholder="输入邮箱" onkeyup="this.value=this.value.replace(/^\s+|\s+$/g,'')" />
                    <span asp-validation-for="Email" class="text-danger"></span>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label asp-for="PhoneNumber" class="control-label"></label>
                    <input asp-for="PhoneNumber" class="form-control" placeholder="输入手机号" onkeyup="this.value=this.value.replace(/^\s+|\s+$/g,'')" />
                    <span asp-validation-for="PhoneNumber" class="text-danger"></span>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label asp-for="Remark" class="control-label"></label>
                    <textarea asp-for="Remark" class="form-control" placeholder="输入备注"></textarea>

                </div>
            </div>
        </div>


    </div>

    <div class="modal-footer">
        <button type="button" class="btn btn-secondary waves-effect" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary waves-effect waves-light">保存</button>
    </div>
</form>
<script>
    Ladda.bind('.btn-primary', { timeout: 1000 });
    $(function () {


        $("#BirthDate").flatpickr({
            mode: "single",
            locale: "zh",
        });
    });
</script>



